
# -*- coding:utf-8 -*-

import sys
import logging
# from ..drivers.pixels impor
reload(sys)

# Standard module stuff
WORDS = ["PIXELS"]
SLUG = "pixels"



_logger = logging.getLogger(__name__)

def handle(text, mic, profile, wxbot=None):
    return


def isValid(text):
    return False


def wakeUp(mic,profile, wxbot=None,pixels=None):
    _logger.info(u"唤醒了 %s",pixels)
    if pixels:
        pixels.wakeup()


def beforeListen(mic,profile, wxbot=None,pixels=None):
    if pixels:
        pixels.listen()



def beforeSay(mic,profile, wxbot=None,pixels=None):
    _logger.info(u"开始说了")
    if pixels:
        pixels.speak()


def onThink(mic,profile, wxbot=None, pixels=None):
    if pixels:
        pixels.think()

def off(mic,profile, wxbot=None, pixels=None):
    if pixels:
        pixels.off()
















